package com.tn.user.controller;

import com.databstech.apis.annotation.mapping.PathRestController;
import com.databstech.apis.result.enums.ResultCodeEnum;
import com.databstech.apis.resultexception.exception.BusinessException;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author tn
 * @version 1
 * @ClassName ExceptionResultController
 * @description 测试
 * @date 2020/9/13 20:40
 */
@PathRestController("/ex")
public class ExceptionResultController {

    @GetMapping("exZero")
    public void exZero(){
        System.err.println(1/0);
    }

    @GetMapping("exZero2")
    public void exZero2(){
       throw new BusinessException(ResultCodeEnum.SysError,"测试手动抛出异常");
    }
}
